fix(ci): repair the publish chain so the workflow can actually run - #2
Merged
Conversation
The workflow declared `tags:` as a top-level key under `on:`, which is not a valid event. GitHub rejected the file outright: every run in this repo's history failed in 0s with "workflow file issue". CI has never executed and the tests have never run on any commit. - Move `tags: ['v*']` under `push:` so tag pushes trigger the workflow - Drop the `github.event_name == 'tag'` clause; tag pushes are `push` - Point the pack matrix at the real project paths (root, not `src/`) - Use `-p:PackageVersion=` instead of the invalid `--version:` - Drop `--no-build`; the pack job runs on a fresh runner - Use folder names in the matrix; artifact names cannot contain "/" - Make `release` depend on `publish` - Rename `CI / CD` -> `CI` and switch the README badge to the file-based URL Verified locally on .NET 10.0.201: build clean, 2/2 tests passing, and every matrix project packs with the version in its filename. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same workflow defect as beyondnetcode/Shell.Aop#8 (already merged and green), plus two packaging bugs that made
dotnet packproduce broken or no output.Root cause 1 — the workflow was never valid
on:declaredtags:as a top-level key, which is not a GitHub Actions event:GitHub rejects the whole file. Every run in this repo's history failed in 0 seconds with "This run likely failed because of a workflow file issue" — CI has never executed, and the 2 tests in this repo have never run on any commit.
Root cause 2 — packaging
NU5019— file not found.BeyondNetCode.Shell.Factoryreferenced../../LICENSEandBeyondNetCode.Shell.Factory.Installerreferenced../../../LICENSE. Both assume asrc/<project>/layout; the projects live at the repo root, so the paths resolve outside the repository. Corrected to../.LICENSElanded in a subfolder.<PackagePath>LICENSE</PackagePath>has no file extension, so NuGet treats it as a directory — verified by unpacking the produced.nupkg, which containedLICENSE/LICENSEinstead ofLICENSE. Corrected to<PackagePath>/</PackagePath>. This one packed without error, so it would have shipped silently to NuGet with the license in the wrong place;Shell.dddhit the same bug but failed loudly because it also setsPackageLicenseFile.Workflow fixes
tags: ['v*']moved underpush:versionjob: droppedgithub.event_name == 'tag'— tag pushes arrive aspushpackmatrix points at the real project locations (repo root, notsrc/)-p:PackageVersion=replaces--version:, which is not adotnet packoption--no-builddropped; the job runs on a fresh runner with nothing pre-builtupload-artifactrejects names containing/releasenow depends onpublishCI / CD→CI; README badge switched to the file-based URLVerification
Locally on .NET 10.0.201 (matching
global.json):Both packages produced, each with
lib/net10.0/andLICENSE+README.mdat the package root — verified withunzip -l.Before releasing
NUGET_API_KEYmust exist in thenuget-releaseenvironment, orpublishfails at the last step.🤖 Generated with Claude Code